package com.example.logindb.sevices;


import com.example.logindb.entity.Location;
import com.example.logindb.entity.Online;
import com.example.logindb.repository.LocationRepository;

import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LocationServiceImpl implements LocationService {
    private LocationRepository locationRepository;
    public LocationServiceImpl(LocationRepository locationRepository)
    {
        this.locationRepository = locationRepository;
    }


    @Override
    public void updateLocation(Location location) {
        locationRepository.save(location);
    }

    @Override
    public Location findAllById(Integer id) {
        return locationRepository.findAllByLocid(id);
    }

    @Override
    public List<Location> findAll() {
        return locationRepository.findAll();
    }


//    @Override
//    public List<String> findGeojsonByBlindID(int id) {
//        return routeRepository.findGeoJsonByBlindid(id);
//    }


}